Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Free Tier Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| } | ||
|
|
||
| return 1; | ||
| } |
There was a problem hiding this comment.
Duplicated file-copy and atomic-swap logic across preparators
Medium Severity
CursorWorkspaceRuntimePreparator and ClaudeCodeWorkspaceRuntimePreparator contain identical copies of copyPathRecursive (~63 lines), mirrorDirectoryContents (~30 lines), and the atomic-swap pattern inside prepare (~40 lines). This refactoring introduced two new classes that share roughly 130 lines of duplicated logic. A shared base class or utility could hold the common file-mirroring and atomic-swap behavior, reducing maintenance burden and the risk of inconsistent bug fixes across the two implementations.
Additional Locations (2)
| 'version' => 1, | ||
| 'editor' => ['vimMode' => false], | ||
| 'permissions' => [ | ||
| 'allow' => [ |
There was a problem hiding this comment.
Public method writeCliConfigTo is now dead code
Low Severity
The public method writeCliConfigTo on CursorCliBinaryManager is now unused. Previously it was called by ensureCliConfig and indirectly by prepareWorkspaceRuntime. Both callers were changed in this refactoring: ensureCliConfig now calls $this->configWriter->writeTo(...) directly, and prepareWorkspaceRuntime delegates to the runtimePreparator which also calls the config writer directly. A grep confirms zero callers remain for writeCliConfigTo.


Note
Medium Risk
Touches workflow run-claim lifecycles and workspace acquisition/removal paths; mistakes could cause stuck/duplicated runs or unintended workspace cleanup behavior. Mostly refactoring with added interfaces/tests, but it affects operationally sensitive agent execution and filesystem/container handling.
Overview
Refactors workflow run concurrency and phase start logic by introducing
executeWithRunClaim()(wraps start/run/release) andPhaseRunStarter(wraps claim creation + label application), then wiring Planning/Implementation executors/starters to use these helpers.Modularizes LLM CLI integration by extracting interfaces for workspace runtime preparation and Cursor CLI config writing, moving Cursor/Claude runtime-copy logic into dedicated preparator services, and updating
AgentStreamParserto delegate per-line handling to a newNdjsonStreamLineParser/DTO.Decouples workspace management via interfaces (
WorkspaceAcquisitionInterface,ProjectContainerManagerInterface,WorkspaceMetadataManagerInterface,WorkspaceRemovalInterface) and routes workspace deletion through a newWorkspaceRemover, withWorkspaceManagementFacade/cleanup/lookup/sweep services updated accordingly and tests adjusted/added.Written by Cursor Bugbot for commit bc32fa7. This will update automatically on new commits. Configure here.